The numbers I'm using to open a trade of about a $500 lot with a $250.00 balance.  With an 
IBFX mini account a $500 lot is entered as .05 lots by Phoenix with MM=true and MaximumRisk=0.19
================================================================================================


extern double     Lots             = 0.10;  
extern double     MaximumRisk      = 0.19;   //changed 09/28/06 /changed 10/05/06
extern double     DecreaseFactor   = 3;
extern bool       PrefSettings     = true;  
extern bool       MM               = true;   
extern bool       AccountIsMicro   = false; 
extern int        TakeProfit       = 0;
extern int        StopLoss         = 0;
extern int        TrailingStop     = 0;

================================================================================================


//+------------------------------------------------------------------+
//| Calculate optimal lot size                                       |
//+------------------------------------------------------------------+
double LotsOptimized()
  {
   double lot=Lots/*MyDistance,Percent*/;
   int    orders=HistoryTotal();     // history orders total
   int    losses=0;                  // number of losses orders without a break
//---- select lot size
//   lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,1);
   lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,2); //nvwine
//---- calcuulate number of losses orders without a break
   if(DecreaseFactor>0)
     {
      for(int i=orders-1;i>=0;i--)
        {
         if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false) { Print("Error in history!"); break; }
         if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL) continue;
         //----
         if(OrderProfit()>0) break;
         if(OrderProfit()<0) losses++;
        }
      if(losses>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1);
     }
// // Print("lot1 =",  ); // nvwine
//---- return lot size
//   if(lot<0.1) lot=0.1;
   if(lot<0.01) lot=0.01;  //nvwine
   if(MM==false) lot=Lots;
   if(AccountIsMicro==true) lot=lot/10; 
   return(lot);
  }
 